home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / database / eb106a.zip / PACK1.PRG / PROC15.PRO < prev    next >
Text File  |  1996-04-02  |  4KB  |  127 lines

  1. Mdeclare output fields
  2.    records.No :records.Date :records.Staff
  3.    records.type :records.hrs
  4.    records.Rate :customers.name : Records.Price
  5.    total  :page number : Grandtotal :date
  6.    showmins :customers.file : records.misc
  7.    prepayments.date :prepayments.amount
  8. end
  9. declare variables
  10.    x as number
  11. end
  12. pause on : escape on
  13. '...............................
  14. date = datetext(system date)
  15. bold on : print report header : bold off
  16. for customers with name in order
  17.    if customers.Balance = 0 or customers.balance = blank then skiprec
  18.    '.....................Header...............
  19.    bold on : underline on : print group header : bold off : underline off
  20.    '.....................customer loop.......
  21.    for records with file = customers.file
  22.       if bottom margin < 1.5 and output <> "screen" then
  23.          print page footer
  24.          page feed
  25.          print page header
  26.       end if
  27.       '..................................
  28.       total = total + records.Price
  29.       grandtotal = grandtotal + records.price
  30.       showmins = zeropad(records.Mins,2,0)
  31.       if records.misc = blank then print list items else print misc
  32.    next
  33.    '....................pre payments
  34.    x = 0
  35.    for Prepayments With file = customers.file
  36.       total = total - Prepayments.amount
  37.       grandtotal = grandtotal - prepayments.amount
  38.       x = x + 1
  39.       print prepay
  40.    next
  41.    '....................footer........
  42.    bold on :print group footer : bold off
  43.    customers.Balance = total
  44.    update record
  45.    total = 0
  46. next
  47. '......................update inhand...........
  48. for inhand
  49.    inhand.total = grandtotal
  50.    update record
  51. next
  52. print report total
  53. '.....................do last page number if printed...........
  54. if output <> "screen" then
  55.    if bottom margin < 1.5 then
  56.       print report footer:page feed : exit procedure
  57.    end if
  58.    do
  59.       line feed
  60.       if bottom margin < 1.5 then exit do
  61.    loop
  62.    print report footer : page feed
  63. end if
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. ).Report Header
  79.       ═══════════════════════════════════════════════════════════════════════
  80.       WORK IN HAND (                    )
  81.       ───────────────────────────────────────────────────────────────────────
  82. .Page Header
  83.                                     Continued
  84.  
  85. .Group Header
  86.                                      (    )
  87.  
  88. .List Items
  89.                                              .   *
  90. .misc
  91.  
  92. .prepay
  93.       Deduct Pre Payment -
  94. .Group Footer
  95.  
  96.  
  97. .Page Footer
  98.  
  99.                                     -     -
  100. .Report total
  101.                                                                    ──────────
  102.  
  103.                                                                    ══════════
  104. .Report Footer
  105.                                     -     -
  106.       ═══════════════════════════════════════════════════════════════════════
  107. .End
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. date                                    20   YesText              customers.name                          30  YesText              'customers.file                           4  YesText           records.Date                             8  No Date           
  120. records.Staff                           10  No Text           records.type                            15  No Text           +records.hrs                              3  No Integer        /showmins                                 2  No Text           4records.Rate                             3 2No Fixed Point    ;Records.Price                            4 2No Fixed Point   records.Date                             8  No Date          
  121. records.Staff                           10  No Text          records.misc                            30  No Text          ;Records.Price                            4 2No Fixed Point   prepayments.date                         8  No Date          :    prepayments.amount                       5 2No Fixed Point   :    total                                    5 2    No Fixed Point   D
  122. total                                    6 2    No Fixed Point   'page number                              3  
  123. YesInteger       D
  124. Grandtotal                               6 2 No Fixed Point   'page number                              3  
  125. YesInteger       Audit